Skip to content

Conversation

Copy link

Copilot AI commented Nov 23, 2025

The Spectrogram node was registered in the UI menu but lacked the required FactoryNode implementation, making it non-functional.

Implementation

Added node/AudioProcessNode/node_spectrogram_node.py:

  • FactoryNode class defining UI with AUDIO input, IMAGE output, configurable FFT size and colormap
  • SpectrogramNode class implementing audio→spectrogram pipeline using existing utility functions (fourier_transformation, make_logscale)
  • Matplotlib compatibility fix: buffer_rgba() replaces deprecated tostring_rgb()

Added test coverage:

  • Basic instantiation and attribute validation
  • Integration tests with synthetic audio (440Hz sine wave)
  • Verification across FFT sizes (512/1024/2048/4096) and colormaps (jet/viridis/plasma/inferno/magma/hot/cool)

Added documentation (EN/FR):

  • Usage guide and technical specifications
  • Audio format: {'samples': np.ndarray, 'sample_rate': int}
  • Output: BGR image compatible with OpenCV pipeline

Usage

# In CV_Studio node editor:
# AudioProcess → Spectrogram
# Connect: Video[Audio Output] → Spectrogram[Audio Input]
# Configure: FFT=1024, Colormap=jet
# Output: Spectrogram[Image Output] → downstream nodes

No existing files modified. All changes additive.

Original prompt

je n'arrive pas de faire fonctionnement le noed spectrogramme


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 6 commits November 23, 2025 01:46
Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
…ram node

Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
…ionality

Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with spectrogram node functionality Implement missing Spectrogram node for AudioProcess pipeline Nov 23, 2025
Copilot AI requested a review from hackolite November 23, 2025 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants